<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
<c:set var="title" value="酒店详情" scope="request" />
<jsp:include page="/head.jsp" />
</head>
<body>
	<c:import url="/news-class.do?mb=header" />
	
	<form enctype="multipart/form-data" method="Post" action="hotel/room-Update.do"  class="form-horizontal">
		<div class="col-md-12">
			<div class="main-title">
				<div>店 铺 基 本 信 息</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">房间类型</label>
			<div class="col-sm-4">
				<select id="slt" name="roomTypeId" class="form-control">
					<option value="1">单人间</option>
					<option value="2">双人间</option>
					<option value="3">豪华三人间</option>
					<option value="4">商务间</option>
					<option value="5">总统套间</option>
				</select>
				<script type="text/javascript">
					$(function(){
						$("#slt").find("option[value = '"+${roomInfo.roomTypeId}+"']").attr("selected","selected");
					});
				</script>
			</div>
			<label class="col-sm-2 control-label">房间编号</label>
			<div class="col-sm-4">
				<input required="required" readonly="readonly" value="${roomInfo.roomId}" type="text" class="form-control" name="roomId" />
			</div>
			<label class="col-sm-2 control-label">房间数量</label>
			<div class="col-sm-4">
				<input required="required" value="${roomInfo.roomNum}" type="text" class="form-control" name="roomNum" />
			</div>
			<label class="col-sm-2 control-label">市场价格</label>
			<div class="col-sm-4">
				<input required="required" value="${roomInfo.roomMarketPrice}" type="text" class="form-control" name="roomMarketPrice" />
			</div>
			<label class="col-sm-2 control-label">平台价格</label>
			<div class="col-sm-4">
				<input required="required" value="${roomInfo.roomPlatformPrice}" type="text" class="form-control" name="roomPlatformPrice" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">店铺说明</label>
			<div class="col-sm-10">
				<textarea name="roomIntroduce" class="form-control" style="height: 8em;">${roomInfo.roomIntroduce}</textarea>
			</div>
		</div>
		<div class="col-md-12">
			<div class="main-title">
				<div>店 铺 照 片</div>
			</div>
		</div>
		<div id="img" class="col-md-12">
    			<img src="${roomInfo.roomImgs }" id="show" width="200">
    			<script type="text/javascript">
				var str = "";
	    			$(function(){
	    				if("${roomInfo.roomImgs }"==null){
	    					str+="<input id='file' required='required' name='file' class='filepath btn btn-default' onchange='changepic(this)' type='file'><br>";
		    			}else{
		    				str+="<a id='btn1' class='btn btn-default' >修改图片</a>";
			    			}
	    				 $("#img").append(str);
	    				 var button = document.getElementById("btn1");
	    				    button.onclick = function () {
		    				    str=""
		    					str+="<input id='file' required='required' name='file' class='filepath btn btn-default' onchange='changepic(this)' type='file'><br>";
		    				    $("#img").append(str);
	    				    }
	    			});
    			</script>
		</div>	
		<div style="width: 16%; margin: auto;">
			<button type="submit" class="btn btn-default">提交</button>
			<a style="margin-left: 50px;" href="javascript:history.go(-1)"class="btn btn-default">返回</a>
		</div>
	</form>


	<jsp:include page="/footer.jsp"/>
</body>
</html>